-- GENERATED SPELL FOR [Jadefire Trickster] --


function spell0_7107(pUnit, Event) --@Cause Insanity,n/a--
pUnit:FullCastSpellOnTarget(12888,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7107', 6298, 1)
end

function spell1_7107(pUnit, Event) --@Curse of Tongues,n/a--
pUnit:FullCastSpellOnTarget(13338,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7107', 15250, 1)
end

function spell2_7107(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7107', 593, 1)
end

function spell3_7107(pUnit, Event) --@Jadefire,Self--
pUnit:FullCastSpellOnTarget(13578,pUnit)
pUnit:RegisterEvent('Sorts_7107', 8262, 1)
end

function Sorts_7107(pUnit, Event)
local choix_sorts_7107 = math.random(0, 3)
if choix_sorts_7107 == 0 then
pUnit:RegisterEvent('spell0_7107', 1, 1)
end
if choix_sorts_7107 == 1 then
pUnit:RegisterEvent('spell1_7107', 1, 1)
end
if choix_sorts_7107 == 2 then
pUnit:RegisterEvent('spell2_7107', 1, 1)
end
if choix_sorts_7107 == 3 then
pUnit:RegisterEvent('spell3_7107', 1, 1)
end
end

function mob7107_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7107', math.random(1500, 3000), 1)
end

function mob7107_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7107_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7107_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7107, 1, 'mob7107_Action')
RegisterUnitEvent(7107, 2, 'mob7107_Leave')
RegisterUnitEvent(7107, 3, 'mob7107_Kill')
RegisterUnitEvent(7107, 4, 'mob7107_Die')
